home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / istar / docs / panels < prev    next >
Encoding:
Text File  |  1996-09-13  |  21.3 KB  |  524 lines

  1. VARIOUS PANELS OF ISTAR
  2.  
  3. Here we describe some of the panels you will encounter in using Istar. 
  4. Those not described here should be fairly obvious once you know these.
  5.  
  6.  
  7. THE SCREENS
  8.  
  9. Istar uses two screens, separate from Workbench.  The Control Screen comes 
  10. up first, with a grey background.  It is used for the panels.  The main 
  11. Easel comes up when you have a knowledge base ready.  Its size can changed 
  12. with the Prefs button on Initial Control Panel.
  13.  
  14.       The control screen usually resides along the bottom and can be moved
  15. manually using the two-pixel strips along its top.  Then there is a thin 
  16. backdrop window that shows the meanings of items.  Important on this window 
  17. is the gadget at the left hand end with two arrows.  This moves the control 
  18. screen up and down quickly.
  19.  
  20.  
  21. THE INITIAL CONTROL PANEL
  22.  
  23. This resides top left corner of the control screen.  One column of buttons 
  24. that valid when there is no KB - things like 'About' and 'Quit'.  The 
  25. 'Errors' button allows you to explore the various levels of any error that 
  26. occurs, though it is perhaps of more use to technical users.
  27.  
  28.       But, to get going, use 'New' or 'Get KB', which will, respectively,
  29. create a new KB for you or load an existing one.  When a KB is successfully 
  30. loaded the main easel will appear and on the control screen a KB panel will 
  31. appear.  You can load or create any number of KBs (depending on memory), 
  32. each with a drawing easel and each with its own KB panel.
  33.  
  34.       (In version 1.01 you could only have a single KB at a time and there
  35. was no KB panel.  Instead, the main control panel held three columns of 
  36. buttons and there were separate panels to select item type, relationship 
  37. type and to show the goal list.)
  38.  
  39.       The 'Prefs' button brings up a Preferences panel.  It will be more
  40. flexible in the future, but at present it allows you to change the size of 
  41. the Easel that comes up for a new KB and to change the size of Easel of an 
  42. existing KB.  The standard is 30 by 24 inches (the units are measured in 
  43. 1/256ths of an inch or approx. tenths of a millimetre).  If you want to 
  44. start off with a different size, change Prefs before clicking 'New'. 
  45. Especially you will want to do this if memory is limited.
  46.  
  47.  
  48. THE KNOWLEDGE BASE PANEL
  49.  
  50. The KB panel concerns a whole knowledge base.  It comprises two columns of 
  51. buttons at its left and two lists at its right, with a few other buttons. 
  52. The name of the KB is shown in the window title of the panel.
  53.  
  54. First column are to do with current KB:
  55.  
  56.       #  Save
  57.       #  Save As
  58.       #  KB Dump - to export ASCII translations of the KB
  59.       #  KB Area - to see details and rename: KBA Panel
  60.       #  Clone KB (not yet working)
  61.       #  Rid - to get rid of the KB
  62.  
  63. Second column are to do with the knowledge in the current KB:
  64.  
  65.       #  Reset Goals (to prepare the goal list for ...)
  66.       #  Infer Goals (to start a run)
  67.       #  Goal List (brings up the Goal List panel)
  68.       #  Att Types (to create new attribute types)
  69.       #  Topics (to manage topics)
  70.       #  Find (to search for item etc. by name or sub-string)
  71.  
  72. Third column is the Item Types list.  This is perhaps the most frequently 
  73. used, as you change item type.  Below it are buttons to create a new item 
  74. type, edit an existing type, clone an existing type (not yet implemented) 
  75. and get rid of an item type (dangerous, since you lose all items of that 
  76. type; try it on a dummy KB you have created for the purpose!).
  77.  
  78. Fourth column is the Relationship Types list, with buttons to create a new 
  79. relationship type or edit an existing one.  You will seldom use this list, 
  80. except when you are making up specific relationships.
  81.  
  82.  
  83. THE KBA PANEL
  84.  
  85. Hit the 'KB Area' button on KB panel, and up comes the 'Knowledge Base 
  86. Area' (KBA) panel, which tells you various things about the KB itself.  The 
  87. most useful things are:
  88.  
  89.       #  Name:  You can change the name of your KB, up to 40 chars.
  90.  
  91.       #  DSA % Expansion:  Make this higher for dynamic KBs; it is the
  92.       amount (as a %) of free space ('virgin glass' if we use the metaphor
  93.       of recycling glass bottles) created in the KB when it is next loaded.
  94.       Standard value is 30%, which gives plenty for the average knowledge
  95.       engineering session.  DSA means 'Data Structure Area' - where almost
  96.       everything goes.
  97.  
  98.       #  Min DSA:  30% of zero is zero, which is a problem when your KB is
  99.       young.  So we also stipulate a minimum size for the DSA.  Standard
  100.       value is 50,000 longwords (200,000 bytes).
  101.  
  102. Altering the last two resizes the KBA when you hit 'OK' (though it doesn't 
  103. work yet in Version 1.03) but you should seldom need to do so.  Of minor 
  104. interest are the following:
  105.  
  106.       #  KBA at:  The address in memory of the start of the KBA.  Decimal.
  107.  
  108.       #  Actual size:  Actual size in memory (bytes).
  109.  
  110.       #  Blocks:  How many separate blocks in the KB.  An Istar free
  111.       attribute typically comprises around 10 blocks.
  112.  
  113.       #  Bottles and Glass:  This shows how much 'free space' or 'glass'
  114.       there is to be recycled.  Bottles shows how many separate pieces,
  115.       Glass the total amount (in bytes).  Usually only of minor interest,
  116.       except when the KB gets fragmented.
  117.  
  118. Other, less useful things are:
  119.  
  120.       #  Version:  Ignore this.  At present always 0.  It is the version of
  121.       software, NOT of the knowledge you have put there.
  122.  
  123.       #  Max Ring Length:  Occasionally this is used to check against
  124.       infinite loops, but not always.  Usually ignore it at 9999.
  125.  
  126.       #  Tasks:  How many Amiga tasks are currently sharing this.  Always 1
  127.       at present (the current task).
  128.  
  129.  
  130. THE ATTRIBUTE DETAILS PANEL
  131.  
  132. Bring up the Attribute Details panel for a given attribute (step 8 in 
  133. <Driving Istar>).  Lots of information, some of which you can change.
  134.  
  135. Exit Buttons:
  136. When you hit OK (or OK-Act) the changes made will be stored with the 
  137. Attribute.
  138. If you hit Cancel, they will not be made - with the exception of those 
  139. lists underneath the exit buttons.
  140. Show:  Helps you find the attribure box on the Easel.  Hitting this button 
  141. will bring back the Easel but with only this attribute and those connected 
  142. to it showing.
  143.  
  144. Top row:  Name and Meaning, as discussed above.  Also a wee OK button for 
  145. convenience.
  146.  
  147. Next row:  To do with Attribute Value
  148. 1.  Attribute Type.  Hit the wee button to change it.
  149. 2.  Value.  Gadget type depends on type, e.g. sliders for proportions. 
  150. There might be more than one gadget; e.g. Ratio is two integers, Bayesian 
  151. is four sliders.
  152.  
  153. Next row:  More about values
  154. 1.  Show Value:  CheckBox you can tick if you want value to be shown on 
  155. main easel.  At present only works for booleans, bayesians, probabilities, 
  156. proportions.
  157. 2.  Inf:  CheckBox Ticked if value is infinite (eg. from divide by 0)
  158. 3.  Unk:  Ticked if unknown.  Attributes can have a value of 'unknown' 
  159. (which is different from 'not answered' below).  This would be for instance 
  160. when you ask the new Employee their age and they say 'I don't know'.
  161. 4.  MBK:  Means 'Must be Known'.  Tick this and 'Unk' is not allowed.  (In 
  162. this version has no effect.)
  163.  
  164.  
  165. DERIVATION
  166.  
  167. The attribute's value must be derived (obtained) from somewhere or somehow. 
  168. Istar offers three methods:
  169.  
  170. Left hand side Three Radio Buttons:  Derivation:  Shows how Value of 
  171. attribute is derived when the KB is run (as in step 10 in <Driving>):
  172. 1.  Constant.  You then alter the Value gadget(s) in row 2.
  173. 2.  Infer.  Then the Inference Method comes into play.  See above for how 
  174. to change it.  See below for Antecedents.
  175. 3.  User Supplied.  This means that to obtain the value we ask the user a 
  176. question when the KB is run.  (If Infer is selected but there are no 
  177. attributes then it is treated as User Supplied.)
  178.  
  179.  
  180. INFERRED ATTRIBUTES
  181.  
  182. The inference method is shown in the gadget to the right of the Infer Radio 
  183. Button, and changed by hitting the wee button attached.  The inference 
  184. method list thus presented depends on the Attribute Type.  For instance 
  185. Integer attributes can have all the normal arithmetic plus more.  See below 
  186. for list of inference methods.
  187.  
  188. Bottom Left of panel:  Antecedents.
  189. Here is a list of the antecedents, in their order.  So if we have 
  190. subtraction inference method then the value of this attribute will be the 
  191. value of the first, minus the values of all the others.  Sometimes the 
  192. order matters, sometimes not.
  193. 'To 1':  You can change the order by selecting an antecedent and hitting 
  194. 'To 1', which moves it to first in list.  Note that this change is NOT 
  195. undone if you then hit Cancel.
  196. 'See':  Hitting 'See' button will bring up the attribute panel of the 
  197. selected antecedent.
  198.  
  199. Bottom Right of panel:  Consequents
  200. As with antecedents.  But changing the order with the 'To 1' button is 
  201. unlikely to make much difference in practice except perhaps some change of 
  202. speed.
  203.  
  204. USER SUPPLIED ATTRIBUTES
  205.  
  206. Long String Gadget 'Q':  To right of 'User Supplied' button.  If you fill 
  207. this in then this is the text that will appear in the User Question panel. 
  208. Usually it is in the form of a question, and can be up to 256 characters 
  209. long.
  210.  
  211. Next Row:  To do with explanation facility.  When the user is asked for a 
  212. value, they might want an explanation of why the question is being asked, 
  213. or more detail about the question.  This text in this string gadget and it 
  214. will be presented to the user when they hit the 'Help' button on the User 
  215. Question Panel.
  216.  
  217. OVERRIDING
  218.  
  219. Next Row:  Overriding.
  220. Knowledge Based Systems are often used in decision support.  This often 
  221. requires the facility to override an attribute's value temporarily to try 
  222. something out.  e.g. "What if we increase the size of this building by 20 
  223. %?"  To allow this, each Attribute in Istar in fact has two values, not one 
  224. - a main value and an override.  The effect of overriding is that 
  225. inferencing does not proceed through this attribute and it is treated as 
  226. Constant or User Supplied rather than inferred.  This could be achieved 
  227. merely by changing the Derivation to Constant and altering the value.  But 
  228. the original value is then lost.  But with the Istar override facility, the 
  229. original value is retained and can be switched back in when the what-iffing 
  230. is finished.
  231.  
  232. 1.  Left Check Box allows Attribute to be overridden.
  233. 2.  String Gadget to its right is for text to put to user when it is 
  234. overridden; see below.
  235. 3.  Check Box to right shows whether or not it has been overridden.  If so, 
  236. then the Value shown is the override value.
  237.  
  238. STATUS OF ATTRIBUTE
  239.  
  240. Next Row: Status.
  241.  
  242. 1.  Answered.  If ticked then this attribute has been answered.  The 
  243. Answered flag is used when running the KB to determine whether or not to 
  244. seek to derive its value.  If answered, do not, if not answered, do.
  245.  
  246.       Normally if User Supplied then the user has answered a User Question
  247. about it.  If Inferred, it usually means that all its antecedents have been 
  248. answered.  e.g. If X = A + B + C, X is answered only when all of A, B, C 
  249. have been answered.  But for some inference methods the attribute can be 
  250. answered before all its antecedents have been.  e.g. X = A * B * C if A is 
  251. 0 then we know the value of X immediately.
  252.  
  253. 2.  Visited (DoneWith).  This is used during forward chaining (q.v.).  It 
  254. means that the value of the attribute has been propagated and so do not 
  255. bother doing so again.  Not usually very instructive information.
  256.  
  257. 3.  Error.  Not yet fully used.  But designed to indicate e.g. trying to 
  258. multiply two strings or other nonsensical things.  This information is 
  259. usually only of value when debugging the KB.
  260.  
  261. OTHER INFO ON ATTRIBUTE
  262.  
  263. Next row:  Other information.
  264.  
  265. 1.  Item to which this attribute belongs.
  266. 2.  'See' takes you to the Item Details Panel.
  267. 3.  DSAP:  Unique internal identifier for the Attribute. ('Data Structure 
  268. Area Pointer').
  269.  
  270. 4.  Topics.  Bring up the Topics panel (q.v.).
  271.  
  272. ANTECEDENTS AND CONSEQUENTS
  273.  
  274. Bottom of panel, left for antecedents, right for consequents
  275.  
  276. 1.  Related attribute list.  Select one and the wee buttons come into play:
  277. 2.  'A' Action button:  Click this to raise the attribute details panel for 
  278. the selected attribute.
  279. 3.  'R':  Click this to raise relationship instance panel for the link.
  280. 4.  'X':  Click this to gain explanation of what happens in the link.
  281. 5.  'To 1':  Click this to make that attribute first in list.
  282.  
  283.  
  284. THE ITEM DETAILS PANEL
  285.  
  286. The item details panel can be accessed by clicking the 'See' button on the 
  287. attribute details panel attached to the item name.  It will also appear if 
  288. you click on an item box on the easel, such as a form.
  289.  
  290.       Most of it is straightforward, such as label/name and meaning.  There
  291. is a list of attributes it contains taking up most of the left hand side. 
  292. With this you can select an attribute and bring up its panel with 'See' and 
  293. you can make it the first attribute in the item with 'To 1', though this 
  294. has very little effect in the current version.
  295.  
  296.       You can attach an item to topics as above.
  297.  
  298.       The two buttons concerned with importing and displaying text are not
  299. effective in this version.
  300.  
  301.  
  302. THE RELATIONSHIP INSTANCE DETAILS PANEL
  303.  
  304. The relationship details panel comes up if you click on a link on the main 
  305. easel or if you click the wee 'R' button at the bottom of the attribute 
  306. detaild panel.  It gives details about the relationship, including 
  307. antecedent and consequent.
  308.  
  309.       The main things of interest are the unary operator, and the weight.
  310. The use of these is explained in the <Using Istar> document.
  311.  
  312.       The Explain button brings up an explanation of what would happen when
  313. inference is performed with this relationship.
  314.  
  315.  
  316. TO CREATE NEW ITEM TYPE
  317.  
  318. To create a new item type the main thing is to give it a name, and then 
  319. some other information depending on what you want it for.  The basic 
  320. operation is as follows:
  321.  
  322. #  Click 'New' button under Item Type list on the KB panel.
  323.  
  324. #  Enter the name for it.
  325.  
  326. #  Ignore all the checkboxes for now.
  327.  
  328. #  What colours do you want?  First Pen gives colour of label, if any. 
  329. Second Pen gives colour of outline box.  Pattern gives pattern for outline 
  330. box.  Similar to Relationship Type Panel.  (This is not available in 
  331. versions earlier than 1.03.)
  332.  
  333. #  Click the 'OK' button.
  334.  
  335. (The new type is automatically selected for drawing.)
  336.  
  337.  
  338. ITEMS FOR SEMANTIC NET
  339.  
  340. In a semantic net (or a mental map) the important thing about items is the 
  341. relationships they have with other items.  So it is a good idea to define 
  342. relationship types that will be drawn from the items of this type.  So we 
  343. add a couple of extra steps to the above, to define the relationship types 
  344. you want (not available until version 1.03).
  345.  
  346. #  Click 'New' button under Item Type list on the KB panel.
  347. #  Enter the name for it.
  348. #  Ignore all the checkboxes for now.
  349.  
  350. #  There are two type gadgets mid-panel, showing 'None' and labelled 'Left' 
  351. and 'Right'.  Click the 'Right' one.  Up comes a list of relationship 
  352. types.  [Bug in version 1.03:  If there is more than one KB active, the 
  353. list will not appear; get rid of all but this KB.]  Select one, such as 
  354. 'Precedence' and click the 'OK' button.
  355.  
  356. #  What colours do you want?  First Pen gives colour of label, if any. 
  357. Second Pen gives colour of outline box.  Pattern gives pattern for outline 
  358. box.  Similar to Relationship Type Panel.
  359.  
  360. #  Click the 'OK' button on the Item Types Panel.
  361.  
  362. #  On the Easel, draw two items of this new type.  Now draw a link from the 
  363. right hand edge of the left one to the other.  It should draw a Precedence 
  364. relationship; you can check this by bringing up the Relationship Instance 
  365. Details panel for the relationship (see above).
  366.  
  367. Note that we did not set the 'Left' relationship type.  We could do so. 
  368. But when it is 'None' then the type drawn will be that shown selected in 
  369. the Relationship Types List on the KB panel.
  370.  
  371.  
  372. ITEMS AS DATABASE RECORDS
  373.  
  374. The other main use of items is as a database record, a collection of 
  375. attributes.  So for this, we take a few extra steps to add attributes. 
  376. (You can create item types with both relationship types and attributes; no 
  377. problem.)
  378.  
  379. #  Click 'New' button under Item Type list on the KB panel.
  380. #  Enter the name for it.
  381. #  Ignore all the checkboxes for now.
  382.  
  383. #  At bottom right is a type gadget which shows attribute type.  Click the 
  384. wee button to its left to bring up list of attribute types.  Select the 
  385. type required.
  386.  
  387. #  (If not available, click Cancel on the list, keep the Item Type panel 
  388. but send it to back, then create the attribute type you require as 
  389. described below.)
  390.  
  391. #  In string gadget to its left, give it a name.
  392.  
  393. #  IMPORTANT:  Now click the rectangular gadget above the attribute type 
  394. gadget to add it to the list of gadgets.
  395.  
  396. #  Repeat the above to add other attributes.
  397.  
  398. #  What colours do you want?  First Pen gives colour of label, if any. 
  399. Second Pen gives colour of outline box.  Pattern gives pattern for outline 
  400. box.  Similar to Relationship Type Panel.  (This is not available in 
  401. versions earlier than 1.03.)
  402.  
  403. #  Click the 'OK' button.
  404.  
  405.  
  406. ITEMS AS FREE ATTRIBUTES
  407.  
  408. You should seldom have to create your own free attribute types, since these 
  409. are automatically created when you create an attribute type.  But if you 
  410. wish to do so, you must create an item with a single attribute and with 
  411. 'Has Own Box' not ticked, so that no box is shown for the item itself. 
  412. (Note that at present it is not possible to suppress the item's box, so you 
  413. cannot strictly create new free attribute types.)
  414.  
  415.  
  416. TO CREATE A NEW ATTRIBUTE TYPE
  417.  
  418. #  In KB panel click the 'Att Types' button.  This brings up a panel for 
  419. attribute types.  The left hand list is of currently available attribute 
  420. types.  The right hand side is for giving ordinals and enumerated types 
  421. (and other types in future) names for their values.
  422.  
  423. #  Decide on name for attribute type and enter that in the 'N' gadget on 
  424. left hand side.
  425.  
  426. #  If you wish, you can give it a meaning in the 'M' gadget.  Maybe to 
  427. explain more about it.
  428.  
  429. #  Now click the wee button at the left of the 'V' type gadget at the 
  430. bottom, to obtain a list of fundamental value types.  Select the one you 
  431. want.
  432.  
  433. #  Lastly, click the left 'Add' action button to add it to the list of 
  434. attribute types available.
  435.  
  436. #  If the value type chosen is Enumerated or Ordinal then you will want to 
  437. add names for its values.  These have values from 1 upwards.
  438.  
  439. #  In the 'N' string give the name for the first value, such as 'Sunday'. 
  440. Then click the right 'Add' button to add it to the list.
  441.  
  442. #  Then give the name for the second value and click 'Add'.  And the third, 
  443. and so on.  Until finished.
  444.  
  445. #  When finished, click the 'Done' button, and the attribute type is 
  446. available for use e.g. in creating an item type.
  447.  
  448.  
  449. CREATING A NEW RELATIONSHIP TYPE
  450.  
  451. Click the 'New' button beneath the Relationship Types list on the KB panel. 
  452. Up comes a panel that allows you to define the name for the relationship 
  453. type, various parameters of it and visual appearance of the lines that 
  454. express its instances on the main easel.
  455.  
  456. #  Enter a name.
  457.  
  458. #  Is it DAG or not?  If DAG (Directed Acyclic Graph) then you cannot form 
  459. cycles with instances of this type of relationship.  That is, you cannot 
  460. build a KB with links e.g. from A to B, B to C, C to D, and D back to A 
  461. (though you can have A to B, B to C, C to D and A to D).  Many types of 
  462. relationship are DAGs, e.g. most dependencies.
  463.  
  464. #  If it is DAG, does this type of relationship perform inference?  Usually 
  465. not.
  466.  
  467. #  The next four check boxes should normally be left ticked for maximum 
  468. flexibility.
  469.  
  470. #  Pens and pattern.  The two pens can define the colours in which 
  471. instances of this type of relationship will be drawn for positive and 
  472. negative versions of the relationship.  If either is zero then a default 
  473. colour will be used that indicates whether the relationship is a DAG, is 
  474. inference or not.  The pattern is 16 pixels repeated along the line. 
  475. Usually used to give visual indication of type of relationship.
  476.  
  477. #  When done, click the 'Create' button (or 'Cancel').
  478.  
  479. EDITING A RELATIONSHIP TYPE
  480.  
  481. To make changes to the name of a relationship type or in any of the above 
  482. parameters, select the type in the Relationship Type list and click the 
  483. 'Edit' button beneath it.
  484.  
  485.       Note that if you alter the visual appearance, existing instances of
  486. this type will not be altered in visual appearance.  But new instances will 
  487. take on the new appearance.  Also, when you bring up a Relationship Details 
  488. panel and click 'OK' the visual appearance will change.
  489.  
  490.       BEWARE:  Do not change parameters of the standard relationship types
  491. (though you may change their visual appearance to suit your tastes).  In 
  492. particular, if you make 'Inference' to be not a DAG you will be allowed to 
  493. create an infinite loop in the KB.
  494.  
  495.  
  496. FINDING SOMETHING BY NAME
  497.  
  498. On main control panel, click the 'Find' button.  This brings up the Find 
  499. panel (which in the current version is rather sparse and empty).  It allows 
  500. you to find attributes, attribute types, items, item types, relationships, 
  501. relationship types by sub-strings their names contain.
  502.  
  503. #  Enter the sub-string in the long string gadget at the top.
  504.  
  505. #  Then click either Item, Att or Rel, depending on what you want to find. 
  506. It then brings up a panel for the thing found, if any: an attribute action 
  507. panel, an item details panel or a relationship instance panel.
  508.  
  509. #  Note that it will search the types before the instances.
  510.  
  511. #  If it's not the one you want, send that panel away (Cancel or Done) and 
  512. click Continue.  It will continue the search from where it left off.
  513.  
  514. #  You can watch the number.
  515.  
  516. #  If you want to find the total number of items, attributes or 
  517. relationships, clear the string gadget and hit the appropriate button.  The 
  518. number then shows you the total number, including the number of types.
  519.  
  520. #  (Note that in current version, Rel does not work.)
  521.  
  522.  
  523. Copyright (c) Andrew Basden, 1996
  524.